#include "process.h"
#include "sw_interrupt.h"


extern void _launch_process(process_info_t *p_info);
extern void _terminate_process(void);

void exit(uint32_t exit_code)
{
        raise_sw_interrupt(SW_INT_EXIT_PROCESS, 0);
	return;
}

void exec_mem( void (*addr)(void), const uint8_t *name, uint32_t stack_size, uint8_t process_priority)
{
	process_info_t p_info;
	p_info.addr = addr;
	p_info.name = name;
	p_info.stack_size = stack_size;
	p_info.process_priority = process_priority;

        raise_sw_interrupt(SW_INT_EXEC_PROCESS, (uint32_t)&p_info);

	return;
}
